<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>

<tiles:importAttribute/>
<c:if test="${!entry.hidden}">
    <div class="entry">
        <div class="entry-left">
            <img src="/static-images/pic-post.gif">
        </div>
        <div class="entry-right">
            <div class="entry-header">
                <a href="<c:url value="/post.form/${entry.id}"/>">
                    <c:out value="${entry.header}"/>
                </a>
            </div>
            <div class="entry-data">
                <fmt:formatDate type="both" value="${entry.date}"/>
                <a href="<c:url value="/viewprofile.form/${entry.author.username}"/>">
                    <c:out value="${entry.author.fullname}"/>
                </a>
                <fmt:message key="app.forum.post.commentscount"/>: <c:out value="${entry.commentCount}"/>
            </div>
            <div class="entry-text">
                <c:out value="${entry:preview(entry.text)}" escapeXml="false"/>
                <c:if test="${entry:isShortened(entry.text)}">
                    <a href="<c:url value="/post.form/${entry.id}"/>"><fmt:message key="app.entry.readEntire"/></a>
                </c:if>
            </div>
            <div class="entry-comment-footer">
                <a href="<c:url value="/addcomment.form/${entry.id}"/>">
                    <fmt:message key="app.forum.comment.add"/>
                </a>
            </div>
        </div>
    </div>
</c:if>
